[NTG-context] Re: The graph is not visible.

2024-04-26 Thread Fabrice Couvreur
numeric a,b; > > > > fixes the problem in chapter 14. > > Woundn't newnumeric be better? > > There are very few instances where I want variables defined in one block > to be reused in another block. So, I almost always use > > \startMPcode > begingroup; > .

[NTG-context] Re: The graph is not visible.

2024-04-26 Thread Aditya Mahajan
ng > >numeric a,b; > > fixes the problem in chapter 14. Woundn't newnumeric be better? There are very few instances where I want variables defined in one block to be reused in another block. So

[NTG-context] Re: The graph is not visible.

2024-04-25 Thread Fabrice Couvreur
Hi, Here is the code that interferes with the graph from the last chapter but why ? \startMPcode pickup pencircle xscaled 1; defaultfont := "texgyrepagella-regular*default" ; defaultscale := 0.8 ; path circle, p, q, b;

[NTG-context] Re: The graph is not visible.

2024-04-25 Thread Fabrice Couvreur
by itself > renders fine: > > > > Best wishes, > Taco > (if all else fails, you can replace \startMPcode with \startMPpage and > generate a standalone graph that way) > > > On 25 Apr 2024, at 12:27, Fabrice Couvreur > wrote: > > > > Hi, > &g

[NTG-context] Re: The graph is not visible.

2024-04-25 Thread Taco Hoekwater
H Fabrice, You did not provide a good minimum test because the graph by itself renders fine: fabr.pdf Description: Adobe PDF document Best wishes, Taco (if all else fails, you can replace \startMPcode with \startMPpage and generate a standalone graph that way) > On 25 Apr 2024, at 12

[NTG-context] The graph is not visible.

2024-04-25 Thread Fabrice Couvreur
problems except with a graphic from the last chapter. It is indeed in chapter 14 but not in the project ! I give the code for this graph. Thanks. Fabrice \startMPcode interim linejoin := mitered; interim ahangle := 30; numeric u, pi; pi

[NTG-context] Re: Fwd: Re: how to apply gradient color to a piece of text?

2024-04-10 Thread Hans Hagen
tline" will be in the next upload so with the current one you need to use the also posted here for ... endfor variant also when i edit the code and replace metapost part like this: \startMPcode      draw lmt_outline [          kind = "outline",          text

[NTG-context] Re: Fwd: Re: how to apply gradient color to a piece of text?

2024-04-09 Thread seyal zavira
seams this code means to put a hidden text with same size behind metapost shape. but it does not work properly for me (current version: 2024.04.01 08:59) and produce empty page but with searchable hidden text. also when i edit the code and replace metapost part like this: \startMPcode draw

[NTG-context] Re: how to apply metapost effects to section title?

2024-04-09 Thread Wolfgang Schuster
seyal.zav...@gmail.com schrieb am 09.04.2024 um 14:53: i want to produce a gradient header i tried this code but it does not produce any result: \startext \def\Mystyle#1{\startMPcode picture tt ; tt := lmt_outline [ kind = "path", text = "#1", ] ; fill

[NTG-context] how to apply metapost effects to section title?

2024-04-09 Thread seyal . zavira
i want to produce a gradient header i tried this code but it does not produce any result: \startext \def\Mystyle#1{\startMPcode picture tt ; tt := lmt_outline [ kind = "path", text = "#1", ] ; fill for i within tt : pathpart i && endfor cycle

[NTG-context] Re: Fwd: Re: how to apply gradient color to a piece of text?

2024-04-08 Thread Hans Hagen
hs which implies no search but you can do this (Keith and/or Hraban will explain and/or wikify it) \starttext \startbuffer[MyText] \definedfont[name:texgyrepagellabold*default]foo f o o% \stopbuffer \startbuffer[MyText] \framed[align=normal,frame=off]{\input{tufte}}% \stopbuffer \setb

[NTG-context] Re: how to include an an svg file?

2024-03-16 Thread Jean-Pierre Delange
we use another call to the same smile drawing (but in *.svg format) % the svg file is given by Inkscape (as the smile.pdf, exported through Inkscape) \startMPcode draw lmt_svg [ filename = "smile.svg"] \stopMPcode \stopchapter \startchapter[title={Hans tricky drawing}] No

[NTG-context] Re: how to include an an svg file?

2024-03-15 Thread seyal zavira
st be callable on the command > > line (which doesn’t work for me on MacOS any more, must investigate…). > \startMPcode > draw lmt_svg [ filename = "smile.svg"] > \stopMPcode > > Now gives the attached but it took me a while to figure out what wo

[NTG-context] Re: how to include an an svg file?

2024-03-15 Thread Hans Hagen via ntg-context
? \externalfigure[smile] without any other settings, but inkscape must be callable on the command line (which doesn’t work for me on MacOS any more, must investigate…). \startMPcode draw lmt_svg [ filename = "smile.svg"] \stopMPcode Now gives the attached but it took me a while

[NTG-context] Re: how to include an an svg file?

2024-03-12 Thread Jean-Pierre Delange
ode: > > \starttext > \startMPcode > draw lmt_svg [ > filename = "smile.svg"] > \stopMPcode > \stoptext I can confirm the problem also with the regular image call \externalfigure

[NTG-context] Re: how to include an an svg file?

2024-03-12 Thread Henning Hraban Ramm
Am 12.03.24 um 14:53 schrieb seyal zavira: > when i want to put some SVGs in my document the svg does not render properly here is the code: > > \starttext > \startMPcode > draw lmt_svg [ > filename = "smile.svg"] > \stop

[NTG-context] Re: how to include an an svg file?

2024-03-12 Thread seyal zavira
> > https://wiki.contextgarden.net/SVG > > Le 12/03/2024 à 14:36, seyal.zav...@gmail.com a écrit : > > hi all. > > > > when i want to put some SVGs in my document the svg does not render > properly here is the code: > > > > \starttext > > \startMPcode &g

[NTG-context] Re: how to include an an svg file?

2024-03-12 Thread Jean-Pierre Delange
Hi ! Did you have a look at this : https://wiki.contextgarden.net/SVG Le 12/03/2024 à 14:36, seyal.zav...@gmail.com a écrit : hi all. when i want to put some SVGs in my document the svg does not render properly here is the code: \starttext \startMPcode draw lmt_svg [ filename = "smil

[NTG-context] how to include an an svg file?

2024-03-12 Thread seyal . zavira
hi all. when i want to put some SVGs in my document the svg does not render properly here is the code: \starttext \startMPcode draw lmt_svg [ filename = "smile.svg"] \stopMPcode \stoptext also when i look at evenmore manual at page15, for font Abelone-FREE the gradients has rendere

[NTG-context] Re: After Compiling the Context test, there was no PDF.

2024-01-24 Thread Shiv Shankar Dayal
> yesterday, I downloaded context-win64, and tried the test today . > > > > Here is the test: > > \starttext > > > > \startmode[mkiv] > > > > \startluacode > > tex.sprint("hello") > > \stopluacode > >

[NTG-context] Re: After Compiling the Context test, there was no PDF.

2024-01-24 Thread Ursula Hermann
Dear List, I am sorry, but once again me: I downloaded the last upload from Hans yesterday, I downloaded context-win64, and tried the test today . Here is the test: \starttext \startmode[mkiv] \startluacode tex.sprint("hello") \stopluacode \startMPcode

[NTG-context] Re: Metapost: draw only subpath; changing thickness of line

2024-01-06 Thread Emanuel Han via ntg-context
Hi Taco, thanks for your help. This works for me! On Jan. 5 2024, at 2:13 pm, Taco Hoekwater wrote: > Hi, > > Here is 'a' way to draw the subpath, at least. I do not have time to come up > with a nice “thicker in the middle” solution. > Best wishes, > Taco > > > \sta

[NTG-context] Re: Metapost: draw only subpath; changing thickness of line

2024-01-05 Thread Taco Hoekwater
Hi, Here is 'a' way to draw the subpath, at least. I do not have time to come up with a nice “thicker in the middle” solution. Best wishes, Taco \startMPcode numeric u; u=1cm; %equiangular spiral numeric a, k ; a = 2.3; %scaling factor k = 8.61722335; path S; S = right for t=1 upto 360

[NTG-context] Metapost: draw only subpath; changing thickness of line

2024-01-05 Thread Emanuel Han via ntg-context
Hi all, I have this MWE. Now I want to draw only the subpath of S between gong6 and gong7 with a red line which is narrower at the two ends and thicker in the middle part. How to achieve this? Thanks! Emanuel \setuppapersize[A4,landscape] \starttext \startMPcode numeric u; u=1cm; %equiangular

[NTG-context] Re: multipage metapost output from ConTeXt

2023-11-27 Thread Fabrice L
fBold] [notonaskharabic-Bold] > [features=fea] > \definefontsynonym [SerifBoldItalic] > [notonaskharabic-Bold-Italic] [features=fea] > \stoptypescript > > \starttypescript [notonaskharabic] > \definetypeface [notonaskharabic] [rm] [seri

[NTG-context] multipage metapost output from ConTeXt

2023-11-27 Thread Emanuel Han via ntg-context
[notonaskharabic] [rm] [serif] [notonaskharabic] [default] \stoptypescript \usetypescript[notonaskharabic] \setupbodyfont [RomanFont] \starttext \startMPcode picture p[]; path bb; %bounding box z0 = (0,0); z1 = (60,40); z2 = (40,90); z3 = (10,70); z4 = (30,50); z5 = (90,70); z6 = (-10,70); path

[NTG-context] Re: Strange behavior with anglestriped()

2023-11-21 Thread Fabrice Couvreur
width is larger in the lower rectangle). >> >> I attach the PDF created with your code. >> >> Best regards: Otared >> >> >> >> On 19 Nov 2023, at 18:56, Fabrice Couvreur >> wrote: >> >> Hi, >> I don't understand why the hatching

[NTG-context] Re: Strange behavior with anglestriped()

2023-11-20 Thread Fabrice L
gt; >> >>> On 19 Nov 2023, at 18:56, Fabrice Couvreur >> <mailto:fabrice1.couvr...@gmail.com>> wrote: >>> >>> Hi, >>> I don't understand why the hatching of the two rectangles is not the same >>> color. >>> Thanks for

[NTG-context] Re: Strange behavior with anglestriped()

2023-11-20 Thread Fabrice Couvreur
the same > color. > Thanks for your help. > Fabrice > > \starttext > \setupbodyfont[8pt] > \startMPcode >path p, q, r, b ; > >z[0] = (2cm,0cm) ; >z[1] = (2cm,2cm) ; >z[2] = (0cm,2cm) ; > >

[NTG-context] Re: Strange behavior with anglestriped()

2023-11-19 Thread Otared Kavian
document On 19 Nov 2023, at 18:56, Fabrice Couvreur <fabrice1.couvr...@gmail.com> wrote:Hi,I don't understand why the hatching of the two rectangles is not the same color. Thanks for your help.Fabrice\starttext        \setupbodyfont[8pt]        \startMPcode           path p, q

[NTG-context] Strange behavior with anglestriped()

2023-11-19 Thread Fabrice Couvreur
Hi, I don't understand why the hatching of the two rectangles is not the same color. Thanks for your help. Fabrice \starttext \setupbodyfont[8pt] \startMPcode path p, q, r, b ; z[0] = (2cm,0cm) ; z[1] = (2cm,2cm) ; z[2] = (0cm,2cm

[NTG-context] Re: Large unwanted white space

2023-10-22 Thread Fabrice Couvreur
f I insert this piece of code, > there > > is a large white space that is created between the horizontal line of the > > header and the first exercise. > > \startMPcode makes an image so it will take space > > for definitions use \startMPdefinitions > > > > \

[NTG-context] Re: Large unwanted white space

2023-10-21 Thread Hans Hagen
exercise. \startMPcode makes an image so it will take space for definitions use \startMPdefinitions \startMPcode def suite (expr n, t) = begingroup numeric u; u := 5mm; pickup pencircle scaled 5pt; for i=0 upto n: for j=0 upto n: drawdot (i*u,j*u) shifted(t

[NTG-context] Re: Large unwanted white space

2023-10-21 Thread Henning Hraban Ramm
and the first exercise. Thanks for your help. Fabrice \startMPcode If I’m not wrong, \startMPcode immediately executes the code. I don’t know why it does if it only contains definitions. Try \startMPinitializations (executed for every MP instance) or \startMPdefinitions (only once). Hraban

[NTG-context] Large unwanted white space

2023-10-21 Thread Fabrice Couvreur
\startMPcode def suite (expr n, t) = begingroup numeric u; u := 5mm; pickup pencircle scaled 5pt; for i=0 upto n: for j=0 upto n: drawdot (i*u,j*u) shifted(t*u,0) withcolor \MPcolor{darkred}; endfor endfor endgroup enddef; def Suite (expr n, t) = begingroup

[NTG-context] Gray gradient with Metapost

2023-10-05 Thread Fabrice Couvreur
Hi, I would like to obtain, if possible, a gray gradient like in the image. My code uses Metapost but maybe this is possible with Metafun. Thanks. Fabrice \starttext \startMPcode u=1.2cm; interim ahangle := 30; z0=(0,0); z1=(3u,0

[NTG-context] How can I use a variable for a MetaPost coordinate ?

2023-10-04 Thread peter.hopcroft--- via ntg-context
on it. Is there a way of doing calculations on the coordinates for the draw using ConTexT variables like \textheight? Thank you, Peter Hopcroft -- \starttext Some text \startMPcode pickup pensquare scaled 1pt; draw (0mm,0mm)--(0mm,\textheight) withcolor red \stopMPcode More text

[NTG-context] Re: Triaging tikz error: Cannot parse this coordinate

2023-08-08 Thread Hans Hagen
 \starttikzpicture    \foreach \p in {(6,2)}    {    \tracingall \startscope[shift={\p}]     \draw[color=green!60, thick] (0,0) -- (1,1); \stopscope    }   \stoptikzpicture looks like some parsing issue, are you sure that you can assign \p to shift this way? puzzle: \startMPcode

[NTG-context] Re: access image properties in Lua

2023-07-17 Thread Alan Braslau via ntg-context
On 17/07/23 17/07/23, 18:20, Henning Hraban Ramm wrote: Bonus question: how also to handle the case of \startMPcode draw figure "MyFigure" xsized TextWidth ; ... \stopMPcode Is MyFigure a pixel image? You could use \externalfigure within MP code. The MP operator figure calls \exte

[NTG-context] Re: access image properties in Lua

2023-07-17 Thread Henning Hraban Ramm
imaging") report("Now calculating...") Bonus question: how also to handle the case of \startMPcode draw figure "MyFigure" xsized TextWidth ; ... \stopMPcode Is MyFigure a pixel image? You could use \externalfigure within MP code. Hraban ___

[NTG-context] Re: access image properties in Lua

2023-07-17 Thread Alan Braslau via ntg-context
and manually case-by-case would be sufficient. Any suggestions on how to hook-in such reporting? Bonus question: how also to handle the case of \startMPcode draw figure "MyFigure" xsized TextWidth ; ... \stopMPcode -- Alan

[NTG-context] Re: Fwd: Re: text width shadow background

2023-07-09 Thread Keith McKay
Hraban (and others), You got me thinking so I added this code to end of your code as a bit of fun. It's code from the luametafun manual to which I added two and a half lines. Best Wishes Keith %%% \startMPcode vardef tst (expr x, y, i, n) = definecolor [ name = "MyColor

[NTG-context] Fwd: Fwd: Re: Fwd: Re: text width shadow background

2023-07-09 Thread Keith McKay
To: mailing list for ConTeXt users , Henning Hraban Ramm I played about with the number of shadow layers and added a wee bit randomness which gave a nice effect. See the code below and the attached png. Best Wishes Keith %%% \startMPcode steps := 30 ; % number of shadow layers rulesize

[NTG-context] Re: text width shadow background

2023-07-08 Thread Henning Hraban Ramm
Please, can you explain why the result of lmt_outline is shifted to the right, if I use it in a macro? """ \setupbodyfont[ss,24pt] \definecolor[tshade][t=.05,a=1,k=1] \starttexdefinition MyCaption #1 \startMPcode steps := 5 ; % number of shadow layers rulesize := BodyF

[NTG-context] Re: text width shadow background

2023-07-06 Thread Henning Hraban Ramm
: """ \setupbodyfont[ss,24pt] \definecolor[tshade][t=.05,a=1,k=1] \starttexdefinition MyCaption #1 \startMPcode{doublefun} steps := 10 ; rulesize := BodyFontSize/steps/3; for step = 1 upto steps: draw lmt_outline [ text = "\bf #1", %style = "bold",

[NTG-context] text width shadow background

2023-07-06 Thread Henning Hraban Ramm
Hi, maybe you remember that I wanted this since 2017... I finally managed to get a fuzzy background behind text: """ \setupbodyfont[ss,24pt] \definecolor[tshade][t=.05,a=1,k=1] \starttexdefinition MyCaption #1 \startMPcode{doublefun} steps := 10 ; rulesize := BodyFontSize/steps/

[NTG-context] Re: Title pages makeup extra blank pages

2023-07-06 Thread Henning Hraban Ramm
actually was \startMPcode; had nothing to do with \startdocument or your code, sorry. Also sorry, seems like I can’t help you. Hraban ___ If your question is of interest to others as well, please add an entry

[NTG-context] Re: MPcode inserts page

2023-07-06 Thread Henning Hraban Ramm
Am 06.07.23 um 12:02 schrieb Alan Braslau: On 06/07/23 06/07/23, 11:23, Henning Hraban Ramm wrote: Hi, if I use \startMPcode to declare variables etc. that I need in several MP graphics, it always inserts an empty page. How can I avoid that? (Actually, I load an external mp file

[NTG-context] Re: MPcode inserts page

2023-07-06 Thread Alan Braslau via ntg-context
On 06/07/23 06/07/23, 11:23, Henning Hraban Ramm wrote: Hi, if I use \startMPcode to declare variables etc. that I need in several MP graphics, it always inserts an empty page. How can I avoid that? (Actually, I load an external mp file, and for random value reasons I must load it only once

[NTG-context] MPcode inserts page

2023-07-06 Thread Henning Hraban Ramm
Hi, if I use \startMPcode to declare variables etc. that I need in several MP graphics, it always inserts an empty page. How can I avoid that? (Actually, I load an external mp file, and for random value reasons I must load it only once. But the MWE already shows the problem.) ""&quo

Re: [NTG-context] right and left arrowfill

2023-06-23 Thread Carlos via ntg-context
l and he knows ConTeXt well. He's quite capable > of figuring out how to use advanced features and I bet he likes the > following variant of arrows in text. Next time we meet I'll show him some > more adaptive tricks (although I bet he can figure them out himself). > > \sta

Re: [NTG-context] right and left arrowfill

2023-06-23 Thread Hans Hagen via ntg-context
\usedadaptiveheight+\usedadaptivedepth\relax]% %\egroup % \stopsetups \startsetups adaptive:test \setbox\usedadaptivebox\hbox to \usedadaptivewidth yoffset .25ex \bgroup \startMPcode drawarrow ((0,0) -- (\the\usedadaptivewidth,0)) randomized (ExHeight/2); \stopMPcode

Re: [NTG-context] Problem with \setuplayout parameters being ignored

2023-03-05 Thread Keith McKay via ntg-context
to put large settings into a setups-blocks and > pass the block to a setup-command. > > \startsetups [apage] > \startMPcode > StartPage; > ... > StopPage; > \stopMPcode > \stopsetups > > \defineoverlay[apage][\directsetup{apage}] > > Wolfgang > > ___

Re: [NTG-context] Problem with \setuplayout parameters being ignored

2023-03-05 Thread Wolfgang Schuster via ntg-context
,   footer=1cm] Another useful method is to put large settings into a setups-blocks and pass the block to a setup-command. \startsetups [apage] \startMPcode StartPage; ... StopPage; \stopMPcode \stopsetups \defineoverlay[apage][\directsetup{apage}] Wolfgang

[NTG-context] Problem with \setuplayout parameters being ignored

2023-03-05 Thread Keith McKay via ntg-context
[ backspace = 2.5cm, margin = 0.5cm, width = 16cm, header = 1cm, footer = 1cm, ] \setupbackgrounds[state=repeat] \defineoverlay[apage][ {\startMPcode StartPage; definecolor[ name = "MyColor1", r = uniformdeviate(1), g = uniformdeviate(1), b = uniformdeviate(1) ] ; definec

Re: [NTG-context] What's the current method for using a variable font in Context and Metapost?

2023-01-20 Thread Lutz Haseloff via ntg-context
\starttext Test Test \definefont[bahnlight][name:bahnschriftlight*default] \startMPcode picture pic; pic := thelabel(textext("\bahnlight This is Bahnschrift light in Metafont 0123456789"), (0, 0)); draw pic; \stopMPcode \stoptext Am 20. Januar 2023 18:28:23 MEZ schrieb Guido Bart

Re: [NTG-context] What's the current method for using a variable font in Context and Metapost?

2023-01-20 Thread Guido Bartolucci via ntg-context
[ss] [bahnschrift] > \setupbodyfont[mainface] > > \ss 123456789 Wild! \medskip > > \startMPcode > picture pic; > pic := thelabel(textext("\ss This is in Metafont 0123456789"), (0, 0)); > draw pic; > \stopMPcode > > > Greetings Lutz > > > Am 20

Re: [NTG-context] What's the current method for using a variable font in Context and Metapost?

2023-01-19 Thread Lutz Haseloff via ntg-context
Hi Guido, this works here: \starttext Test Test \usemodule[fonts-variable] \definefontfamily [mainface] [ss] [bahnschrift] \setupbodyfont[mainface] \ss 123456789 Wild! \medskip \startMPcode picture pic; pic := thelabel(textext("\ss This is in Metafont 0123456789"), (0, 0))

[NTG-context] What's the current method for using a variable font in Context and Metapost?

2023-01-19 Thread Guido Bartolucci via ntg-context
\startMPcode picture pic; pic := thelabel("This is in Metafont 0123456789", (0, 0)); draw pic; \stopMPcode \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! mail

Re: [NTG-context] MP figure continuation

2023-01-06 Thread Alan Braslau via ntg-context
eful. > > Thanks in advance and happy new year, > Alex Another solution is to save the picture: \startMPcode draw fullcircle scaled 1cm ; picture mypicture ; mypicture := currentpicture ; \stopMPcode Then, the next call to \startMPcode (or whatever you use) will have access to the saved p

Re: [NTG-context] About macro numberstriped ()

2022-10-02 Thread Fabrice Couvreur via ntg-context
I just tried but I got an empty file... Do we agree that I have to replace the two lines with the other two ? Regarding what you proposed, how to get the same type of hatching in both figures ? \startMPcode path p, q, r, b ; p := unitsquare xyscaled (4cm,4cm) ; z[0] = (2cm,0cm

Re: [NTG-context] About macro numberstriped ()

2022-10-02 Thread Hans Hagen via ntg-context
on the dimensions of the squares. some unexpected side effect show up when the unitsquare is xyscaled to a rectangle like (2.5cm,1cm) it seems related to the angle chosen e.g. \startMPcode path p, q, r, b ; p  := unitsquare xyscaled (4cm,4cm) ; q := unitsquare xyscaled (1cm,1cm) shifted(0,3cm

Re: [NTG-context] About macro numberstriped ()

2022-10-02 Thread Fabrice Couvreur via ntg-context
Not only, it is also true with the code below : \startMPcode path p, q, r, b ; p := unitsquare xyscaled (4cm,4cm) ; z[0] = (2cm,0cm) ; z[1] = (2cm,4cm) ; z[2] = (0cm,2cm) ; q := llcorner p--z[0]--z[1]--z[2]--cycle ; r := unitsquare xyscaled (1cm,1cm) shifted(0,3cm

Re: [NTG-context] About macro numberstriped ()

2022-10-02 Thread Floris van Manen via ntg-context
up when the unitsquare is xyscaled to a rectangle like (2.5cm,1cm) it seems related to the angle chosen e.g. \startMPcode path p, q, r, b ; p := unitsquare xyscaled (4cm,4cm) ; q := unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ; r := unitsquare xyscaled (2.5cm,1cm) shifted(1cm,3cm) ; b

Re: [NTG-context] About macro numberstriped ()

2022-10-02 Thread Fabrice Couvreur via ntg-context
artlinecorrection[blank] > > \startmidaligned > > \switchtobodyfont[9pt] > > \startMPcode > > path p, q, r, b ; > > p := unitsquare xyscaled (4cm,4cm) ; > > z[0] = (2cm,0cm) ; > > z[1] = (2cm,4cm) ; > > z[2]

Re: [NTG-context] About macro numberstriped ()

2022-10-01 Thread Mikael Sundqvist via ntg-context
t; \startlinecorrection[blank] > \startmidaligned > \switchtobodyfont[9pt] > \startMPcode > path p, q, r, b ; > p := unitsquare xyscaled (4cm,4cm) ; > z[0] = (2cm,0cm) ; > z[1] = (2cm,4cm) ; > z[2] = (0cm,2cm) ; > q := llcorner p--z[0]--z[1]--z[2]--cyc

Re: [NTG-context] About macro numberstriped ()

2022-10-01 Thread Fabrice Couvreur via ntg-context
Hi Hans, When the rectangles are not identical, how to have the same type of hatching in both ? Thanks. Fabrice \starttext \startlinecorrection[blank] \startmidaligned \switchtobodyfont[9pt] \startMPcode path p, q, r, b ; p := unitsquare xyscaled (4cm,4cm) ; z[0

Re: [NTG-context] About macro numberstriped ()

2022-09-28 Thread Fabrice Couvreur via ntg-context
22 7:49 PM, Fabrice Couvreur via ntg-context wrote: > > Hello, > > I notice a strange behavior of the macro numberstriped ( ). > > Thanks. > > Fabrice > > > > \starttext > > \switchtobodyfont[9pt] > > \startMPcode > > > >path p

Re: [NTG-context] About macro numberstriped ()

2022-09-27 Thread Hans Hagen via ntg-context
On 9/27/2022 7:49 PM, Fabrice Couvreur via ntg-context wrote: Hello, I notice a strange behavior of the macro numberstriped ( ). Thanks. Fabrice \starttext  \switchtobodyfont[9pt]  \startMPcode   path p, q, r, b ;   p  := unitsquare xyscaled (4cm,4cm) ;   z[0] = (2cm,0cm) ;   z[1] = (2cm

[NTG-context] About macro numberstriped ()

2022-09-27 Thread Fabrice Couvreur via ntg-context
Hello, I notice a strange behavior of the macro numberstriped ( ). Thanks. Fabrice \starttext \switchtobodyfont[9pt] \startMPcode path p, q, r, b ; p := unitsquare xyscaled (4cm,4cm) ; z[0] = (2cm,0cm) ; z[1] = (2cm,4cm) ; z[2] = (0cm,2cm) ; q := llcorner p--z[0]--z[1]--z[2

Re: [NTG-context] metafun paralleled does not give a parallel path

2022-08-25 Thread Bruce Horrocks via ntg-context
: >> >> The following used to produce three parallel lines. >> Now it produces one straight line and two arcs. >> >> \starttext >> >> \startMPcode >> z0 = origin; >> z1 = 72dir(45); >> dotlabel.bot("z0", z0); >> draw z

Re: [NTG-context] metafun paralleled does not give a parallel path

2022-08-25 Thread Fabrice L via ntg-context
Hi,Le 24 août 2022 à 22:50, fv leung via ntg-context <ntg-context@ntg.nl> a écrit :The following used to produce three parallel lines.Now it produces one straight line and two arcs.\starttext\startMPcode  z0 = origin;  z1 = 72dir(45);  dotlabel.bot("z0", z0);  draw z0--z

[NTG-context] metafun paralleled does not give a parallel path

2022-08-24 Thread fv leung via ntg-context
The following used to produce three parallel lines. Now it produces one straight line and two arcs. \starttext \startMPcode z0 = origin; z1 = 72dir(45); dotlabel.bot("z0", z0); draw z0--z1; draw (z0--z1) paralleled -15 withcolor red; draw (z0--z1) paralleled 15 with

Re: [NTG-context] Metafun hexagons aren't hexagons

2022-07-21 Thread Alan via ntg-context
s. > > > > draw textext(decimal length unitcircle) ; > i'll change it to octagon (was only used for some envelope tracing > experiment) \startMPcode fullhexagon := for i=0 upto 5 : .5dir(60i) -- endfor cycle ; unithexagon := fullhexagon shifted (.5,.5) ; draw fullhexagon scaled 1cm

Re: [NTG-context] no greyscales in MetaFun any more?

2022-07-21 Thread Alan via ntg-context
l.lft(100-s, (0, (s-2.5)*mm)); > > endfor; > > \stopMPpage > > > > This used to work with previous LMTX versions. > fixed in next upload Is this related? (regression: uniqueMPgraphic drops color) \startuniqueMPgraphic{red} draw textext("red?") withcolor red ; \st

Re: [NTG-context] MetaPost label font size

2022-07-06 Thread Hans Hagen via ntg-context
On 7/6/2022 1:36 PM, Henning Hraban Ramm via ntg-context wrote: Am 06.07.22 um 12:45 schrieb Hans Hagen via ntg-context: On 7/6/2022 12:19 PM, fv leung via ntg-context wrote: My stupid way to get labels of different sizes: \starttext \startMPcode    label("normal label", (0, 0));

Re: [NTG-context] MetaPost label font size

2022-07-06 Thread fv leung via ntg-context
I've used something like the following before. \starttext \startMPcode label("normal label", (0, 0)); label("{\switchtobodyfont[3pt] tiny label}", (0, 18)); label("{\switchtobodyfont[72pt] giant label}", (0, -72)); \stopMPcode \stoptext Henning Hraban R

Re: [NTG-context] MetaPost label font size

2022-07-06 Thread Henning Hraban Ramm via ntg-context
Am 06.07.22 um 12:45 schrieb Hans Hagen via ntg-context: On 7/6/2022 12:19 PM, fv leung via ntg-context wrote: My stupid way to get labels of different sizes: \starttext \startMPcode    label("normal label", (0, 0));    label("\setsmallbodyfont small label",

Re: [NTG-context] MetaPost label font size

2022-07-06 Thread Hans Hagen via ntg-context
On 7/6/2022 12:19 PM, fv leung via ntg-context wrote: My stupid way to get labels of different sizes: \starttext \startMPcode   label("normal label", (0, 0));   label("\setsmallbodyfont small label", (0, 18));   label("\setbigbodyfont big label", (0,

Re: [NTG-context] MetaPost label font size

2022-07-06 Thread fv leung via ntg-context
My stupid way to get labels of different sizes: \starttext \startMPcode label("normal label", (0, 0)); label("\setsmallbodyfont small label", (0, 18)); label("\setbigbodyfont big label", (0, -18)); \stopMPcode \stoptext Henning Hraban Ramm via ntg-co

Re: [NTG-context] SVG text alignment issue

2022-06-29 Thread Hans Hagen via ntg-context
finition of \includesvgbuffer, here is a simpler example illustrating the issue: \starttext \startplacefigure[location=here, title={Test}] \dontleavehmode\begingroup \startMPcode draw fullcircle scaled 2cm; \stopMPcode\endgroup \stopplacefigure \stoptext

Re: [NTG-context] SVG text alignment issue

2022-06-28 Thread Aditya Mahajan via ntg-context
font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">16p13.3 > > \stopbuffer > > \starttext >\placefigure[]{}{\includesvgbuffer[svg][conversion=mp]} > \stoptext > % EOF This has nothing to do with SVG. Looking at the definitio

Re: [NTG-context] [Bug] Two-column text: Larger top spacing in inline images

2022-06-27 Thread Max Chernoff via ntg-context
. Lorem ipsum. Lorem ipsum. Lorem ipsum. Lorem ipsum. \startMPcode draw fullcircle scaled 1cm; \stopMPcode\ Lorem ipsum. Lorem ipsum. Lorem ipsum.} \starttext \example \startcolumns[grid=off] \example \stopcolumns \stoptext -- Max

[NTG-context] [Bug] Two-column text: Larger top spacing in inline images

2022-06-26 Thread Marcin Ciura via ntg-context
. \startMPcode draw fullcircle scaled 1cm; \stopMPcode\ Lorem ipsum. Lorem ipsum. Lorem ipsum.} \starttext \example \startcolumns \example \stopcolumns \stoptext Best regards, Marcin Ciura ___ If your question

[NTG-context] new upload

2022-04-19 Thread Hans Hagen via ntg-context
) withpen pencircle scaled AdaptiveThickness withcolor white ; enddef ; \stopMPdefinitions \startsetups adaptive:test \setbox\usedadaptivebox\hbox to \usedadaptivewidth yoffset -.9\usedadaptivedepth \bgroup \hss \startMPcode TickTock

Re: [NTG-context] Math functions not typeset inside MetaPost

2022-04-19 Thread Mikael Sundqvist via ntg-context
unctions inside MetaPost strings, the function is not typeset > correctly. Please consider the following MWE: > > \starttext > \startMPcode > draw textext("\m{\max_i x_i}"); > \stopMPcode > \stoptext > > which produces the output attached her

[NTG-context] Math functions not typeset inside MetaPost

2022-04-19 Thread śrīrāma via ntg-context
the following MWE: \starttext \startMPcode draw textext("\m{\max_i x_i}"); \stopMPcode \stoptext which produces the output attached here as an image. Instead of the mfunction maxᵢ xᵢ some form of the string mathfunctionhandlelabel is typeset. I tried to inspect \math_function_ha

Re: [NTG-context] $\sin \theta$ behave differently in metafun

2022-04-16 Thread śrīrāma via ntg-context
ribe what is going wrong I may > be mistaken. Strangely, my attachments never make it to the list. Trying again: attached an image of the output of the tiny MWE – \starttext \startMPcode draw textext("\m{\max_i x_i}"

Re: [NTG-context] $\sin \theta$ behave differently in metafun

2022-04-16 Thread Bruce Horrocks via ntg-context
ndred. A > tiny MWE: > > \starttext >\startMPcode >draw textext("\m{\max_i x_i}"); >\stopMPcode > \stoptext > > Could trace it down to '\math_function_handle_label' [math-ini] but not sure > what MP is doing. Also looked into mp-mlib, mlib-pps

Re: [NTG-context] $\sin \theta$ behave differently in metafun

2022-04-15 Thread śrīrāma via ntg-context
os$. > > \processMPbuffer[pointCircle] > > \stoptext Hi Hans and Mikael (and others on the list), I can confirm that even with the newest LMTX [2022.04.15 20:20] the above might actually be a bug. mfunctions inside MP strings are not properly rendred. A tiny MWE: \starttext \s

[NTG-context] new upload

2022-04-15 Thread Hans Hagen via ntg-context
*AdaptiveThickness) withpen pencircle scaled AdaptiveThickness withcolor white ; enddef ; \stopMPdefinitions \startsetups adaptive:test \setbox\usedadaptivebox\hbox to \usedadaptivewidth yoffset -.9\usedadaptivedepth \bgroup \hss \startMPcode

Re: [NTG-context] Chapter number retrieval

2022-03-23 Thread Willi Egger via ntg-context
overview of accessible variables at: >> https://tex.stackexchange.com/questions/134474/context-part-chapter-section-and-subsection-names >> >> Maybe you want something like this? >> >> \starttext >> \setuphead[chapter][number=no] >> \startchapter[title={My C

Re: [NTG-context] Chapter number retrieval

2022-03-22 Thread Adam Reviczky via ntg-context
cessible variables at: > https://tex.stackexchange.com/questions/134474/context-part-chapter-section-and-subsection-names > > > > Maybe you want something like this? > > > > \starttext > > \setuphead[chapter][number=no] > > \startchapter[title={My Chapter}] >

Re: [NTG-context] Chapter number retrieval

2022-03-22 Thread Willi Egger via ntg-context
ection-and-subsection-names > > Maybe you want something like this? > > \starttext > \setuphead[chapter][number=no] > \startchapter[title={My Chapter}] > Hello world! > \startMPcode > label("\currentstructurelistnumber\ \currentstructuretitle", origin);

Re: [NTG-context] Chapter number retrieval

2022-03-21 Thread Adam Reviczky via ntg-context
Hi, There is a good overview of accessible variables at: https://tex.stackexchange.com/questions/134474/context-part-chapter-section-and-subsection-names Maybe you want something like this? \starttext \setuphead[chapter][number=no] \startchapter[title={My Chapter}] Hello world! \startMPcode

[NTG-context] Errors compiling the MetaFun manual

2022-03-12 Thread Marco Patzer via ntg-context
should report the other errors, too. I'm not using the failing bits myself, so I don't need fix for that. Motivation is to help find issues with the current release. Marco %% metafun > log > error: A primary expression can't begin with ';' \starttext \startMPcode uniquelist(a) ;

Re: [NTG-context] \asciimode and MetaPost in LMTX result in “Isolated expression”

2022-03-12 Thread Hans Hagen via ntg-context
On 3/12/2022 3:35 PM, Marco Patzer via ntg-context wrote: On Mon, 31 Jan 2022 20:02:42 +0100 Marco Patzer via ntg-context wrote: LMTX seems to have an issue with \asciimode and MetaPost: \asciimode \starttext \startMPcode fill unitsquare scaled 2cm; \stopMPcode \stoptext Results

Re: [NTG-context] \asciimode and MetaPost in LMTX result in “Isolated expression”

2022-03-12 Thread Marco Patzer via ntg-context
On Mon, 31 Jan 2022 20:02:42 +0100 Marco Patzer via ntg-context wrote: > LMTX seems to have an issue with \asciimode and MetaPost: > > \asciimode > \starttext > \startMPcode > fill unitsquare scaled 2cm; > \stopMPcode > \stoptext > > Results in: >

Re: [NTG-context] No svg file output

2022-03-05 Thread Jan-Erik Hägglöf via ntg-context
It worked, thank you very much. /Jan-Erik > 4 mars 2022 kl. 10:59 skrev Hans Hagen : > > On 3/3/2022 10:54 PM, Jan-Erik Hägglöf via ntg-context wrote: >> Dear list! >> This seems strange, what is wrong? No output from svg-file. >> \starttext >> \startMPcod

Re: [NTG-context] No svg file output

2022-03-04 Thread Hans Hagen via ntg-context
On 3/3/2022 10:54 PM, Jan-Erik Hägglöf via ntg-context wrote: Dear list! This seems strange, what is wrong? No output from svg-file. \starttext \startMPcode picture utf1; utf1:= lmt_svg [ filename = "utfall01b.svg"]; numeric l ; l := bbwidth(utf1); numeric h ; h := bbh

  1   2   3   4   5   6   7   8   9   10   >